﻿/* AgileFx Version 2.0
 * An open-source framework for rapid development of applications and services using Microsoft.net
 * Developed by: AgileHead
 * Website: www.agilefx.org
 * This component is licensed under the terms of the Apache 2.0 License.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AgileFx.MVC.FormValidation
{
    public class RangeRule : ValidationRule
    {
        public RangeRule(int min, int max)
        {
            this.min = min;
            this.max = max;
        }

        private int min { get; set; }
        private int max { get; set; }

        public override string GetAttributeString()
        {
            return string.Format("range({0}:{1})", min, max);
        }
    }
}
